// var i;
// var AL_GAME_HUA_AddPrefab = require("./AL_GAME_HUA_AddPrefab");
// var AL_GAME_HUA_Instance = require("./AL_GAME_HUA_Instance");
// var AL_GAME_HUA_Common = require("./AL_GAME_HUA_Common");
// var AL_GAME_HUA_Define = require("./AL_GAME_HUA_Define");
// var AL_GAME_HUA_PopupSelf = require("./AL_GAME_HUA_PopupSelf");
// var AL_GAME_HUA_EventConfig = require("./AL_GAME_HUA_EventConfig");
// var AL_GAME_HUA_PropConfig = require("./AL_GAME_HUA_PropConfig");
// var AL_GAME_HUA_GameData = require("./AL_GAME_HUA_GameData");
// var AL_GAME_HUA_GoodsConfig = require("./AL_GAME_HUA_GoodsConfig");
// var AL_GAME_HUA_i18nMgr = require("./AL_GAME_HUA_i18nMgr");
// var g = cc._decorator;
// var y = g.ccclass;
// var m = g.property;
// var v =
//     (g.menu,
//     (function () {
//         function e() {
//             this.node = null;
//             this.choose = null;
//             this.addButton = null;
//             this.node_number = null;
//             this.label_number = null;
//             this.node_lock = null;
//             this.label_lock = null;
//         }
//         e.prototype.init = function (e) {
//             var t = this;
//             this.choose = this.node.getChildByName("click");
//             this.addButton = this.node.getChildByName("addbtn");
//             this.node_number = this.node.getChildByName("num");
//             this.label_number = this.node_number.getChildByName("Label").getComponent(cc.Label);
//             this.node_lock = this.node.getChildByName("mask");
//             this.label_lock = this.node_lock.children[1].getComponent(cc.Label);
//             this.choose.active = !1;
//             this.addButton.active = !1;
//             this.node_number.active = !1;
//             this.node_lock.active = !1;
//             e.shifou_suoding
//                 ? (this.shezhi_suoding(e.lockNum),
//                   this.node.on(
//                       cc.Node.EventType.TOUCH_END,
//                       function () {
//                           AL_GAME_HUA_AddPrefab.AddPrefab.chuangjian_tishi_jiedian_mianban({
//                               str: "技能未解锁"
//                           });
//                       },
//                       this
//                   ))
//                 : (this.shuaxin_shuliang(e.count),
//                   this.node.on(
//                       cc.Node.EventType.TOUCH_END,
//                       function () {
//                           t.count > 0
//                               ? t.choose.active
//                                   ? (t.chuli_xuanze_zhuangtai(!1), e.onChoose && e.onChoose(t, !1))
//                                   : (t.chuli_xuanze_zhuangtai(!0), e.onChoose && e.onChoose(t, !0))
//                               : e.onAdd && e.onAdd(t);
//                       },
//                       this
//                   ));
//         };
//         e.prototype.shezhi_suoding = function (e) {
//             this.node_lock.active = !0;
//             this.label_lock.string = "LV" + e.toString();
//         };
//         e.prototype.shuaxin_shuliang = function (e) {
//             this.addButton.active = 0 == e;
//             this.node_number.active = e > 0;
//             this.label_number.string = e.toString();
//             this.count = e;
//         };
//         e.prototype.chuli_xuanze_zhuangtai = function (e) {
//             this.choose.active = e;
//             this.node_number.active = !e;
//         };
//         __decorate([m(cc.Node)], e.prototype, "node", void 0);
//         return __decorate([y("AL_GAME_HUA_PropStartButton")], e);
//     })());
// var D = (function (e) {
//     function t() {
//         var t = (null !== e && e.apply(this, arguments)) || this;
//         t.label_level = null;
//         t.prop = [];
//         t.node_button_gift = null;
//         return t;
//     }
//     __extends(t, e);
//     t.prototype.onLoad = function () {
//         var t = this;
//         if (e.prototype.onLoad) {
//             e.prototype.onLoad.call(this);
//         }
//         AL_APP_SDK_MANAGER.on(
//             AL_GAME_HUA_Define.GameEvent.CHANGE_PROP_NUM,
//             function (e) {
//                 t.prop[e.idx].shuaxin_shuliang(e.num);
//             },
//             this
//         );
//         AL_GAME_HUA_Instance.Instance.xianshi_dingbu_tiao({
//             target: this.node,
//             showAll: !0
//         });
//     };
//     t.prototype.start = function () {
//         AL_GAME_HUA_Instance.Instance.LevelType == AL_GAME_HUA_Define.Define.LevelType.NORMAL
//             ? (this.label_level.string = AL_GAME_HUA_i18nMgr.i18nMgr._huoqu_biaoqian("第x关", [
//                   AL_GAME_HUA_GameData.GameData.getInstance().huoqu_yijiesuo_guanqia().toString()
//               ]))
//             : AL_GAME_HUA_Instance.Instance.LevelType == AL_GAME_HUA_Define.Define.LevelType.SPECIAL &&
//               (this.label_level.string = AL_GAME_HUA_i18nMgr.i18nMgr._huoqu_biaoqian("第x关", [
//                   AL_GAME_HUA_GameData.GameData.getInstance().huoqu_yijiesuo_teshu_guanqia().toString()
//               ]));
//     };
//     t.prototype.zhixing_chushihua_chuli = function (e) {
//         this.options = e;
//         var t = AL_GAME_HUA_GameData.GameData.getInstance();
//         var n = t.huoqu_yijiesuo_guanqia();
//         var o = AL_GAME_HUA_PropConfig.PropConfig.getInstance();
//         t.useTimeEnter = !1;
//         t.useTipsEnter = !1;
//         t.useStarEnter = !1;
//         this.prop.forEach(function (e, i) {
//             var r = o.huoqu_shuxing_shifou_yijiesuo(n, i);
//             var a = o.huoqu_peizhi_genju_id(i).unlock;
//             var c = t.huoqu_prop_shuliang(i);
//             e.init({
//                 shifou_suoding: !r,
//                 lockNum: a,
//                 count: c,
//                 onAdd: function () {
//                     AL_GAME_HUA_AddPrefab.AddPrefab.chuangjian_zengjia_daoju_mianban({
//                         id: i
//                     });
//                 },
//                 onChoose: function (e, n) {
//                     i == AL_GAME_HUA_PropConfig.PropId.TIPS_ENTER
//                         ? (t.useTipsEnter = n)
//                         : i == AL_GAME_HUA_PropConfig.PropId.STAR_ENTER
//                         ? (t.useStarEnter = n)
//                         : i == AL_GAME_HUA_PropConfig.PropId.TIME_ENTER && (t.useTimeEnter = n);
//                 }
//             });
//         });
//         this.node_button_gift.active = o.huoqu_suoyou_jinru_shuxing_yi_jiesuo();
//     };
//     t.prototype.chuli_xianshi_hou = function () {
//         var e = AL_GAME_HUA_GameData.GameData.getInstance();
//         var t = e.huoqu_yijiesuo_guanqia();
//         var n = AL_GAME_HUA_PropConfig.PropConfig.getInstance().huoqu_shuxing_jinru_yindao(t);
//         if (n >= 0) {
//             AL_GAME_HUA_AddPrefab.AddPrefab.chuangjian_zhezhao_yindao_mianban(
//                 this.prop[n].node,
//                 ["魔法棒引导", "加时引导", "双倍星星引导"][n]
//             );
//             e.shezhi_prop_jiesuo(n);
//         }
//     };
//     t.prototype.onDestroy = function () {
//         if (e.prototype.onDestroy) {
//             e.prototype.onDestroy.call(this);
//         }
//         AL_APP_SDK_MANAGER.off(this);
//     };
//     t.prototype.onEnable = function () {
//         AL_APP_SDK_MANAGER.emit(AL_GAME_HUA_Define.GameEvent.ON_GAME_CLUB_HIDE, {
//             node: this.node,
//             hide: !0
//         });
//     };
//     t.prototype.onDisable = function () {
//         AL_APP_SDK_MANAGER.emit(AL_GAME_HUA_Define.GameEvent.ON_GAME_CLUB_HIDE, {
//             node: this.node,
//             hide: !1
//         });
//     };
//     t.prototype.handle_button_callback = function (e, t) {
//         var n = this;
//         switch (t) {
//             case "close":
//                 if (this.options.onClose) {
//                     this.options.onClose();
//                 }
//                 this.close();
//                 break;
//             case "start":
//                 var o = AL_GAME_HUA_GameData.GameData.getInstance();
//                 if (o.useStarEnter) {
//                     o.genggai_prop_shuliang(AL_GAME_HUA_PropConfig.PropId.STAR_ENTER, -1);
//                     AL_GAME_HUA_EventConfig.EventConfig.getInstance().assetsReportCost({
//                         source: AL_GAME_HUA_EventConfig.AssetsSource.game,
//                         action: AL_GAME_HUA_EventConfig.AssetsAction.cost,
//                         goodsList: [
//                             {
//                                 goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_doubleStar,
//                                 num: 1
//                             }
//                         ]
//                     });
//                 }
//                 if (o.useTimeEnter) {
//                     o.genggai_prop_shuliang(AL_GAME_HUA_PropConfig.PropId.TIME_ENTER, -1);
//                     AL_GAME_HUA_EventConfig.EventConfig.getInstance().assetsReportCost({
//                         source: AL_GAME_HUA_EventConfig.AssetsSource.game,
//                         action: AL_GAME_HUA_EventConfig.AssetsAction.cost,
//                         goodsList: [
//                             {
//                                 goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_overtime,
//                                 num: 1
//                             }
//                         ]
//                     });
//                 }
//                 if (o.useTipsEnter) {
//                     o.genggai_prop_shuliang(AL_GAME_HUA_PropConfig.PropId.TIPS_ENTER, -1);
//                     AL_GAME_HUA_EventConfig.EventConfig.getInstance().assetsReportCost({
//                         source: AL_GAME_HUA_EventConfig.AssetsSource.game,
//                         action: AL_GAME_HUA_EventConfig.AssetsAction.cost,
//                         goodsList: [
//                             {
//                                 goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_magicStick,
//                                 num: 1
//                             }
//                         ]
//                     });
//                 }
//                 AL_GAME_HUA_Instance.Instance.jiancha_tili_shifou_zugou(function () {
//                     AL_GAME_HUA_Instance.Instance.qianwang_youxi();
//                 });
//                 break;
//             case "video":
//                 AL_GAME_HUA_Common.Common.showVideo({
//                     success: function (e) {
//                         n.prop.forEach(function (e) {
//                             e.chuli_xuanze_zhuangtai(!0);
//                         });
//                         var t = AL_GAME_HUA_GameData.GameData.getInstance();
//                         t.useTipsEnter = !0;
//                         t.useTimeEnter = !0;
//                         t.useStarEnter = !0;
//                         AL_GAME_HUA_EventConfig.EventConfig.getInstance().assetsReportOutput({
//                             source: AL_GAME_HUA_EventConfig.AssetsSource.game,
//                             action:
//                                 2 == e.type
//                                     ? AL_GAME_HUA_EventConfig.AssetsAction.video_get
//                                     : AL_GAME_HUA_EventConfig.AssetsAction.share_get,
//                             goodsList: [
//                                 {
//                                     goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_magicStick,
//                                     num: 1
//                                 },
//                                 {
//                                     goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_overtime,
//                                     num: 1
//                                 },
//                                 {
//                                     goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_doubleStar,
//                                     num: 1
//                                 }
//                             ]
//                         });
//                         AL_GAME_HUA_EventConfig.EventConfig.getInstance().assetsReportCost({
//                             source: AL_GAME_HUA_EventConfig.AssetsSource.game,
//                             action: AL_GAME_HUA_EventConfig.AssetsAction.cost,
//                             goodsList: [
//                                 {
//                                     goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_magicStick,
//                                     num: 1
//                                 },
//                                 {
//                                     goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_overtime,
//                                     num: 1
//                                 },
//                                 {
//                                     goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_doubleStar,
//                                     num: 1
//                                 }
//                             ]
//                         });
//                         AL_GAME_HUA_Instance.Instance.qianwang_youxi();
//                     },
//                     fail: function () {
//                         AL_GAME_HUA_AddPrefab.AddPrefab.chuangjian_tishi_jiedian_mianban({
//                             str: "暂无视频"
//                         });
//                         n.yincang_block_top();
//                     },
//                     completed: function () {}
//                 });
//         }
//     };
//     __decorate([m(cc.Label)], t.prototype, "label_level", void 0);
//     __decorate([m([v])], t.prototype, "prop", void 0);
//     __decorate([m(cc.Node)], t.prototype, "node_button_gift", void 0);
//     return __decorate([y], t);
// })(AL_GAME_HUA_PopupSelf.default);
// exports.default = D;

const AL_GAME_HUA_AddPrefab = require("./AL_GAME_HUA_AddPrefab");
const AL_GAME_HUA_Instance = require("./AL_GAME_HUA_Instance");
const AL_GAME_HUA_Common = require("./AL_GAME_HUA_Common");
const AL_GAME_HUA_Define = require("./AL_GAME_HUA_Define");
const AL_GAME_HUA_PopupSelf = require("./AL_GAME_HUA_PopupSelf");
const AL_GAME_HUA_EventConfig = require("./AL_GAME_HUA_EventConfig");
const AL_GAME_HUA_PropConfig = require("./AL_GAME_HUA_PropConfig");
const AL_GAME_HUA_GameData = require("./AL_GAME_HUA_GameData");
const AL_GAME_HUA_GoodsConfig = require("./AL_GAME_HUA_GoodsConfig");
const AL_GAME_HUA_i18nMgr = require("./AL_GAME_HUA_i18nMgr");

const { ccclass, property } = cc._decorator;

/**
 * AL_GAME_HUA_PropStartButton class handles the button states for prop related actions
 */
@ccclass("AL_GAME_HUA_PropStartButton")
class PropStartButton {
    @property(cc.Node)
    node = null;

    choose = null;
    addButton = null;
    numNode = null;
    numLabel = null;
    lockNode = null;
    lockLabel = null;

    /**
     * Initializes the button states based on data
     * @param {Object} data - contains shifou_suoding, lockNum, count, onAdd and onChoose
     */
    init(data) {
        const self = this;
        this.choose = this.node.getChildByName("click");
        this.addButton = this.node.getChildByName("addbtn");
        this.numNode = this.node.getChildByName("num");
        this.numLabel = this.numNode.getChildByName("Label").getComponent(cc.Label);
        this.lockNode = this.node.getChildByName("mask");
        this.lockLabel = this.lockNode.children[1].getComponent(cc.Label);

        // Set initial visibility
        this.choose.active = false;
        this.addButton.active = false;
        this.numNode.active = false;
        this.lockNode.active = false;

        // Set button functionality based on `shifou_suoding` status
        if (data.shifou_suoding) {
            this.shezhi_suoding(data.lockNum);
            this.node.on(cc.Node.EventType.TOUCH_END, function() {
                AL_GAME_HUA_AddPrefab.AddPrefab.chuangjian_tishi_jiedian_mianban({ str: "技能未解锁" });
            }, this);
        } else {
            this.shuaxin_shuliang(data.count);
            this.node.on(cc.Node.EventType.TOUCH_END, function() {
                if (self.count > 0) {
                    self.choose.active
                        ? (self.chuli_xuanze_zhuangtai(false), data.onChoose && data.onChoose(self, false))
                        : (self.chuli_xuanze_zhuangtai(true), data.onChoose && data.onChoose(self, true));
                } else {
                    data.onAdd && data.onAdd(self);
                }
            }, this);
        }
    }

    /**
     * Set lock display based on lock number
     * @param {number} lockNum - the lock number
     */
    shezhi_suoding(lockNum) {
        this.lockNode.active = true;
        this.lockLabel.string = "LV" + lockNum.toString();
    }

    /**
     * Refresh counts and update display accordingly
     * @param {number} count - the count number
     */
    shuaxin_shuliang(count) {
        this.addButton.active = count === 0;
        this.numNode.active = count > 0;
        this.numLabel.string = count.toString();
        this.count = count;
    }

    /**
     * Set chosen state
     * @param {boolean} chosen - true if chosen, false otherwise
     */
    chuli_xuanze_zhuangtai(chosen) {
        this.choose.active = chosen;
        this.numNode.active = !chosen;
    }
}

/**
 * PopupSelf class for handling display and interaction
 * Based on the commonly used AL_GAME_HUA_PopupSelf.default class
 */
@ccclass
class PopupSelf extends AL_GAME_HUA_PopupSelf.default {
    @property(cc.Label)
    label_level = null;

    @property([PropStartButton])
    prop = [];
    
    @property(cc.Node)
    node_button_gift = null;

    /**
     * Load callback function, configures event listeners
     */
    onLoad() {
        if (super.onLoad) {
            super.onLoad();
        }
        AL_APP_SDK_MANAGER.on(
            AL_GAME_HUA_Define.GameEvent.CHANGE_PROP_NUM,
            function(event) {
                this.prop[event.idx].shuaxin_shuliang(event.num);
            },
            this
        );

        AL_GAME_HUA_Instance.Instance.xianshi_dingbu_tiao({
            target: this.node,
            showAll: true
        });
    }

    /**
     * Start callback function, handles label settings
     */
    start() {
        if (AL_GAME_HUA_Instance.Instance.LevelType === AL_GAME_HUA_Define.Define.LevelType.NORMAL) {
            this.label_level.string = AL_GAME_HUA_i18nMgr.i18nMgr._huoqu_biaoqian("第x关", [
                AL_GAME_HUA_GameData.GameData.getInstance().huoqu_yijiesuo_guanqia().toString()
            ]);
        } else if (AL_GAME_HUA_Instance.Instance.LevelType === AL_GAME_HUA_Define.Define.LevelType.SPECIAL) {
            this.label_level.string = AL_GAME_HUA_i18nMgr.i18nMgr._huoqu_biaoqian("第x关", [
                AL_GAME_HUA_GameData.GameData.getInstance().huoqu_yijiesuo_teshu_guanqia().toString()
            ]);
        }
    }

    /**
     * Initialize the props with unlock and num information
     * @param {Object} options
     */
    zhixing_chushihua_chuli(options) {
        this.options = options;
        const gameData = AL_GAME_HUA_GameData.GameData.getInstance();
        const unlockLevel = gameData.huoqu_yijiesuo_guanqia();
        const propConfigInstance = AL_GAME_HUA_PropConfig.PropConfig.getInstance();

        gameData.useTimeEnter = false;
        gameData.useTipsEnter = false;
        gameData.useStarEnter = false;

        this.prop.forEach((propInstance, index) => {
            const isUnlocked = propConfigInstance.huoqu_shuxing_shifou_yijiesuo(unlockLevel, index);
            const lockNum = propConfigInstance.huoqu_peizhi_genju_id(index).unlock;
            const count = gameData.huoqu_prop_shuliang(index);

            propInstance.init({
                shifou_suoding: !isUnlocked,
                lockNum,
                count,
                onAdd: function() {
                    AL_GAME_HUA_AddPrefab.AddPrefab.chuangjian_zengjia_daoju_mianban({ id: index });
                },
                onChoose: (propInstance, chosen) => {
                    if (index === AL_GAME_HUA_PropConfig.PropId.TIPS_ENTER) {
                        gameData.useTipsEnter = chosen;
                    } else if (index === AL_GAME_HUA_PropConfig.PropId.STAR_ENTER) {
                        gameData.useStarEnter = chosen;
                    } else if (index === AL_GAME_HUA_PropConfig.PropId.TIME_ENTER) {
                        gameData.useTimeEnter = chosen;
                    }
                }
            });
        });

        this.node_button_gift.active = propConfigInstance.huoqu_suoyou_jinru_shuxing_yi_jiesuo();
    }

    /**
     * This function triggers after the panel show, initiating guides if necessary
     */
    chuli_xianshi_hou() {
        const gameDataInstance = AL_GAME_HUA_GameData.GameData.getInstance();
        const unlockLevel = gameDataInstance.huoqu_yijiesuo_guanqia();
        const propGuide = AL_GAME_HUA_PropConfig.PropConfig.getInstance().huoqu_shuxing_jinru_yindao(unlockLevel);

        if (propGuide >= 0) {
            AL_GAME_HUA_AddPrefab.AddPrefab.chuangjian_zhezhao_yindao_mianban(
                this.prop[propGuide].node,
                ["魔法棒引导", "加时引导", "双倍星星引导"][propGuide]
            );
            gameDataInstance.shezhi_prop_jiesuo(propGuide);
        }
    }

    /**
     * Handles panel destruction, removing related event listeners
     */
    onDestroy() {
        if (super.onDestroy) {
            super.onDestroy();
        }
        AL_APP_SDK_MANAGER.off(this);
    }

    /**
     * Enables the game club hide event
     */
    onEnable() {
        AL_APP_SDK_MANAGER.emit(AL_GAME_HUA_Define.GameEvent.ON_GAME_CLUB_HIDE, {
            node: this.node,
            hide: true
        });
    }

    /**
     * Disables the game club hide event
     */
    onDisable() {
        AL_APP_SDK_MANAGER.emit(AL_GAME_HUA_Define.GameEvent.ON_GAME_CLUB_HIDE, {
            node: this.node,
            hide: false
        });
    }

    /**
     * Generic button handling for the popup
     * 
     * @param {Object} event - The click event triggered.
     * @param {string} actionType - Denotes the type of action for the button.
     */
    handle_button_callback(event, actionType) {
        const self = this;

        switch (actionType) {
            case "close":
                if (this.options.onClose) {
                    this.options.onClose();
                }
                this.close();
                break;

            case "start":
                const gdInstance = AL_GAME_HUA_GameData.GameData.getInstance();

                if (gdInstance.useStarEnter) {
                    gdInstance.genggai_prop_shuliang(AL_GAME_HUA_PropConfig.PropId.STAR_ENTER, -1);
                    AL_GAME_HUA_EventConfig.EventConfig.getInstance().assetsReportCost({
                        source: AL_GAME_HUA_EventConfig.AssetsSource.game,
                        action: AL_GAME_HUA_EventConfig.AssetsAction.cost,
                        goodsList: [{ goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_doubleStar, num: 1 }]
                    });
                }
                if (gdInstance.useTimeEnter) {
                    gdInstance.genggai_prop_shuliang(AL_GAME_HUA_PropConfig.PropId.TIME_ENTER, -1);
                    AL_GAME_HUA_EventConfig.EventConfig.getInstance().assetsReportCost({
                        source: AL_GAME_HUA_EventConfig.AssetsSource.game,
                        action: AL_GAME_HUA_EventConfig.AssetsAction.cost,
                        goodsList: [{ goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_overtime, num: 1 }]
                    });
                }
                if (gdInstance.useTipsEnter) {
                    gdInstance.genggai_prop_shuliang(AL_GAME_HUA_PropConfig.PropId.TIPS_ENTER, -1);
                    AL_GAME_HUA_EventConfig.EventConfig.getInstance().assetsReportCost({
                        source: AL_GAME_HUA_EventConfig.AssetsSource.game,
                        action: AL_GAME_HUA_EventConfig.AssetsAction.cost,
                        goodsList: [{ goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_magicStick, num: 1 }]
                    });
                }
                AL_GAME_HUA_Instance.Instance.jiancha_tili_shifou_zugou(() => {
                    AL_GAME_HUA_Instance.Instance.qianwang_youxi();
                });
                break;

            case "video":
                AL_GAME_HUA_Common.Common.showVideo({
                    success: function(result) {
                        self.prop.forEach(propInstance => propInstance.chuli_xuanze_zhuangtai(true));

                        const gd = AL_GAME_HUA_GameData.GameData.getInstance();
                        gd.useTipsEnter = true;
                        gd.useTimeEnter = true;
                        gd.useStarEnter = true;

                        AL_GAME_HUA_EventConfig.EventConfig.getInstance().assetsReportOutput({
                            source: AL_GAME_HUA_EventConfig.AssetsSource.game,
                            action: result.type === 2
                                ? AL_GAME_HUA_EventConfig.AssetsAction.video_get
                                : AL_GAME_HUA_EventConfig.AssetsAction.share_get,
                            goodsList: [
                                { goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_magicStick, num: 1 },
                                { goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_overtime, num: 1 },
                                { goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_doubleStar, num: 1 }
                            ]
                        });

                        AL_GAME_HUA_EventConfig.EventConfig.getInstance().assetsReportCost({
                            source: AL_GAME_HUA_EventConfig.AssetsSource.game,
                            action: AL_GAME_HUA_EventConfig.AssetsAction.cost,
                            goodsList: [
                                { goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_magicStick, num: 1 },
                                { goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_overtime, num: 1 },
                                { goods: AL_GAME_HUA_GoodsConfig.GoodsId.prop_doubleStar, num: 1 }
                            ]
                        });
                        AL_GAME_HUA_Instance.Instance.qianwang_youxi();
                    },
                    fail: function() {
                        AL_GAME_HUA_AddPrefab.AddPrefab.chuangjian_tishi_jiedian_mianban({ str: "暂无视频" });
                        self.yincang_block_top();
                    },
                    completed: function() {}
                });
                break;
        }
    }
}
exports.default = PopupSelf;